<%@ page contentType="text/html;charset=UTF-8" language="java" pageEncoding="UTF-8"%>
<%@ include file="lib.jsp" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <title>京西店家首页</title>
  <link rel="stylesheet" type="text/css" href="css/index.css" />

</head>

<body bgcolor="#F0F8FF">

<div class="page">
  <div>
    <br>
  </div>
  <ul id="jsddm">
    <li>
      <a href="../boss/bossindex">首页</a>
    </li>
    <li onmouseover="showSubMenu(this)" onmouseout="hideSubMenu(this)">
      <a>商品分类</a>
      <ul>
        <li><a href="../boss/ShowType?tid=101">服饰</a></li>
        <li><a href="../boss/ShowType?tid=102">食品</a></li>
        <li><a href="../boss/ShowType?tid=103">书籍</a></li>
        <li><a href="../boss/ShowType?tid=104">科技</a></li>
        <li><a href="../boss/ShowType?tid=105">日用</a></li>
      </ul>
    </li>
    <li>
      <a href="orderList">我的订单</a>
    </li>
    <li onmouseover="showSubMenu(this)" onmouseout="hideSubMenu(this)">
      <a >个人中心</a>
      <ul>
        <li><a href="../boss/bossindex.jsp">个人中心</a></li>
        <li><a href="../boss/logout">退出登录</a></li>
      </ul>
    </li>
    <li style="width: 331px">
      <form action="../boss/getGoodsByGname" method="post">
        <input type="text" name="gname" style="width: 200px;height: 30px;border:1px solid #000000;">
        <input type="submit" name="submit" value="搜索" style="border:1px solid #000000;width: 40px;height: 25px">
      </form>
    </li>
  </ul>
  <script type="text/javascript">
    //显示子菜单
    function showSubMenu(li){
      var subMenu = li.getElementsByTagName("ul")[0];
      subMenu.style.display = "block";
    }

    //隐藏子菜单
    function hideSubMenu(li){
      var subMenu = li.getElementsByTagName("ul")[0];
      subMenu.style.display = "none";
    }

    function num_jia(){
      var i = event.target.id.slice(2);
      var x = document.getElementById("number_"+i);
      var y = document.getElementById("price_"+i).innerHTML;
      var z = document.getElementById("allprice_"+i);
      var a = parseInt(x.value);
      var b = parseInt(y);
      a++;
      x.value=a;
      z.innerHTML=a*b.toString();
    }

    function num_jian(){
      var i = event.target.id.slice(2);
      var x = document.getElementById("number_"+i);
      var y = document.getElementById("price_"+i).innerHTML;
      var z = document.getElementById("allprice_"+i);
      var a = parseInt(x.value);
      var b = parseInt(y);
      if(a>1){
        a--;
      }else{
        a=1;
      }
      x.value=a;
      z.innerHTML=a*b.toString();
    }
  </script>

  <div class="content">

    <div class="you" style="width: 1000px">
      <div class="clearit"></div>

      <!---------------------------------------------------↓ 首页随机接口 ↓--------------------------------->
      <!-------------for循环生成div i<=(list.size()+1)/2 ---------------->


      <form action="" method="post">
        <br>
        <p style="font-family:楷体; font-size: 24px; color: black"; >订单详情</p><br />
        <table style="border:1px solid #000; position: relative; left: 10px;">
          <thead>
          <tr>
            <th style="width: 50px">订单号</th>
            <th style="width: 150px">下单时间</th>
            <th style="width: 75px">商品图片</th>
            <th style="width: 100px">商品名称</th>
            <th style="width: 50px">单价</th>
            <th style="width: 50px">数量</th>
            <th style="width: 50px">总金额</th>
            <th style="width: 100px">下单用户</th>
            <th style="width: 100px">用户联系方式</th>
            <th style="width: 200px">送货地址</th>
          </thead>

          <tbody>
			<c:forEach items="${orderList}" var="vo">
				<tr>
					<td>${vo.did}</td>
					<td>${vo.buy_date}</td>
					<td><img src="../img/${vo.picture}" width="50" height="50"> </td>
					<td>${vo.gname}</td>
					<td>${vo.gprice}</td>
					<td>${vo.good_num}</td>
					<td>${vo.gprice*vo.good_num}</td>
					<td>${vo.cname}</td>
					<td>${vo.tel}</td>
					<td>${vo.address}</td>
				</tr>
			</c:forEach>


          </tbody>
        </table>
        <br>

      </form>


      <!---------------------------------------------------↑ 首页随机商品接口 ↑--------------------------------->



    </div>
    <br>
    <div class="clearit"></div>

  </div>
</div>
<div>
  <p class="banquan">&nbsp;</p>
  <p class="banquan">版权所有：刘艺杰、安森泰、张恒超、卢晓丹、贾文婷 2021-现在</p>
  <a href="mailto:2629145453@qq.com"><p class="banquan">联系我们</p></a>
  <p class="banquan">&nbsp;</p>
</div>

</body>
</html>
